[seekdb][vector] Fix HGRAPH snapshot key prefix#952
Merged
Conversation
Member
Author
|
The mapping Dima issue is [[seekdb][ddltest_duomo][errcode=-7604] [Vsag](Log=BufferStreamReader: The file size is smaller than the memory you want to read]( |
f65d279 to
23d4ed5
Compare
footka
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task Description
Fix a Vsag deserialize failure (
BufferStreamReader: The file size is smaller than the memory you want to read) that occurs when OceanBase reloads a serialized HGRAPH snapshot index from the snapshot data table. The failure happens because the binary stream reconstructed from snapshot rows can be incomplete or mixed, causing Vsag to attempt reading more bytes than are available.Solution Description
The root cause was that the row key for normal DDL HGRAPH snapshot data was generated without the snapshot version (
tabletId_hgraph_data_partNNNNN), while other vector snapshot paths (direct-load, async refresh) correctly usedtabletId_snapshotVersion_hgraph_data_partNNNNN. This missing version weakened version isolation.The fix modifies the normal DDL HGRAPH snapshot key generation to include the
snapshot_version_, making ittabletId_snapshotVersion_hgraph_data_partNNNNN. This aligns it with the existing direct-load and async refresh key formats and restores the invariant shared by write, adapter prefix management, and reload operations.Passed Regressions
git diff --checkob-make -j4 ob_storageUpgrade Compatibility
This change only affects newly written HGRAPH snapshot-data row keys generated by normal DDL. It aligns the normal DDL key format with the existing formats used by direct-load and async refresh.
Other Information
ca47db833ea fix vector hgraph snapshot key prefix.2is not included in this MR.Release Note
Fixed a Vsag deserialize failure during HGRAPH snapshot index reload by correcting the snapshot data row key prefix for normal DDL operations to include the snapshot version, ensuring proper version isolation.